<template>
    <div>
        <el-container>
            <el-header style="padding: 0;">
                <myHeader  @click="selectItem($event)"></myHeader>            
            </el-header>
            <el-main style="padding: 0;">
                <router-view></router-view>
            </el-main>
        </el-container>
    </div>
</template>
<script>
import myHeader from '../components/myheader.vue'

export default{
    data(){
        return{
            selectedItem: 2,  // 用于存储当前选择的项目
        }
    },
    components:{
        myHeader
    },
    methods: {
        selectItem(event) {
            console.log(event); 
        }
    }
}
</script>

<style>
  .el-header{
    background-color: #F7F7F7;
    color: #333;
    text-align: center;
    line-height: 60px;
  }
  .el-main {
    background-color: #F7F7F7;
    color: #333;
    text-align: center;
    height: 800px;
  }
  
  body > .el-container {
    margin-bottom: 40px;
  }
  
  .el-container:nth-child(5) .el-aside,
  .el-container:nth-child(6) .el-aside {
    line-height: 260px;
  }
  
  .el-container:nth-child(7) .el-aside {
    line-height: 320px;
  }
</style>
